﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;

namespace BUS
{
    public class KhachHangBUS
    {
        public List<KhachHangDTO> LayThongTinKH()
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.LayThongTinKH();
        }
        public List<KhachHangDTO> LayKHTheoMaKH(string Makh)
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.LayKHtheoMaKH(Makh);
        }
        public string MaKHMoi()
        {
            KhachHangDAO dao = new KhachHangDAO();
            string kq = dao.TaoMaKHMoi();
            return kq;
        }
        public int ThemKhachHang(KhachHangDTO khDTO)
        {
            KhachHangDAO dao = new KhachHangDAO();
            int kq = dao.ThemKhachHang(khDTO);
            return kq;

        }
        public List<KhachHangDTO> LayThongTinKhachHangTheoLoai(int LoaiKH)
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.LayThongTinKhachHangTheoLoai(LoaiKH);
        }
        public int LayLoaiKhachHang(string MaKH)
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.LayLoaiKhachHang(MaKH);
        }
        public string LayDienThoaiKhachHang(string MaKH)
        {
              KhachHangDAO dao = new KhachHangDAO();
              return dao.LayDienThoaiKhachHang(MaKH);
        }
        public string LayDiaChiKhachHang(string MaKH)
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.LayDiaChiKhachHang(MaKH);
        }
        public int CapNhatDiemCV(int DiemCV, string MaKH)
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.CapNhatDiemCV(DiemCV,MaKH);
        }
        public int LayDiemCV(string MaKH)
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.LayDiemCV(MaKH);
        }
        public string LayTenKhachHang(string MaKH)
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.LayTenKhachHang(MaKH);
        }
        public int XoaKH(string MaKH)
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.XoaKH(MaKH);

        }

        public List<KhachHangDTO> TiemKiemKhachHang(string tiemkiem)
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.TiemKiemKhachHang(tiemkiem);
        }
        public int CapNhatThongTinKhachHang(KhachHangDTO khDTO)
        {
             KhachHangDAO dao = new KhachHangDAO();
             return dao.CapNhatThongTinKhachHang(khDTO);
        }
    }
}
